package jiyun.com.yiyanmeng;


import android.os.Bundle;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;

import base.BaseActivity;
import presenter.ZhiFuPresenter;
import view.ZhiFuView;

public class ZhiFuActivity extends BaseActivity<ZhiFuView, ZhiFuPresenter> {


    /**
     * 取消
     */
    private TextView mTvLeft;
    /**
     * 返回
     */
    private TextView mImageBack;
    /**
     * 立即学习
     */
    private TextView mTvTitle;
    private RelativeLayout mRl;
    private ImageView mImage;
    /**
     * asfd
     */
    private TextView mTxtTitle;
    /**
     * safa
     */
    private TextView mTxtTime;
    /**  */
    private TextView mTvPrice;
    private TextView mTvTotalPrice;
    /**
     * 立即购买
     */
    private TextView mTvBuy;
    private RelativeLayout mRl3;
    private String id;
    private String name;
    private String pic;
    private String class_hour;
    private String jia_ge;

    @Override
    protected void initData() {

    }

    @Override
    protected void setListener() {

    }

    @Override
    protected void initView() {

        mTvLeft = (TextView) findViewById(R.id.tv_left);
        mImageBack = (TextView) findViewById(R.id.image_back);
        mTvTitle = (TextView) findViewById(R.id.tv_title);
        mRl = (RelativeLayout) findViewById(R.id.rl);
        mImage = (ImageView) findViewById(R.id.image);
        mTxtTitle = (TextView) findViewById(R.id.txt_title);
        mTxtTime = (TextView) findViewById(R.id.txt_time);
        mRl = (RelativeLayout) findViewById(R.id.rl);
        mTvPrice = (TextView) findViewById(R.id.tv_price);
        mTvTotalPrice = (TextView) findViewById(R.id.tv_total_price);
        mTvBuy = (TextView) findViewById(R.id.tv_buy);
        mRl3 = (RelativeLayout) findViewById(R.id.rl3);
        id = getIntent().getStringExtra("id");
        name = getIntent().getStringExtra("name");
        pic = getIntent().getStringExtra("pic");
        class_hour = getIntent().getStringExtra("class_hour");
        jia_ge = getIntent().getStringExtra("jia_ge");
        mTxtTitle.setText(name);
        mTxtTime.setText(class_hour+"课时");
        Glide.with(this).load(pic).into(mImage);
        mTvPrice.setText("￥"+jia_ge);
        mTvTotalPrice.setText("￥"+jia_ge);
    }

    @Override
    protected ZhiFuPresenter createPresenter() {
        return new ZhiFuPresenter();
    }

    @Override
    protected int bindLayoutId() {
        return R.layout.activity_zhi_fu;
    }

    @Override
    public void showToast(String msg) {

    }
}
